package com.xs;

/**
 * 自定义协议
 */
public class CustomProtcol<T> {

	private int command; // 命令

	private int length; // body 长度

	private T body;// 实际数据

	public CustomProtcol(int command, int length, T body) {
		super();
		this.command = command;
		this.length = length;
		this.body = body;
	}

	public T getBody() {
		return body;
	}

	public void setBody(T body) {
		this.body = body;
	}

	public CustomProtcol() {

	}

	public int getCommand() {
		return command;
	}

	public void setCommand(int command) {
		this.command = command;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	@Override
	public String toString() {
		return "CustomProtcol [command=" + command + ", length=" + length + ", body=" + body + "]";
	}

	
	
	
}
